home *** CD-ROM | disk | FTP | other *** search
- /****
- * CNeoBenchDoc.h
- *
- * Document class for a typical application.
- *
- ****/
-
- #ifndef _H_NeoBench
- #define _H_NeoBench /* Include this file only once */
- #include <time.h>
-
- /*
- * A NeoPhase structure, containing a target string,
- * number of iterations done, and a soFar in milliseconds.
- */
-
- #define cmdSTOP 1000
- #define cmdGO 1001
-
- /**
- * Constants that define the locations of the panes that get created
- * And also their spacing.
- **/
- #define H_TOTAL 103 // Vert and Hor positions of top Total
- #define V_TOTAL 57 // Editable textbox
-
- #define H_STAT_START 160 // Vert and Hor position of top left
- #define V_STAT_START 57 // Static text array
-
- #define V_LINE_POSN 82 // Where the lines are drawn for the
- // first item.
-
- #define H_DIST 80 // Horiz distance between Stat text panes
- #define V_DIST 20 // Vertical distance between text panes.
-
- #define TOT_WID 50 // Width of Total Edit text boxes
- #define TOT_HGT 16 // Height of the Total EditText box
-
- #define SIZE_WID 30 // Width of size text edit
-
- #define STAT_WID 60 // Width of Static text area
- #define STAT_HGT 21 // Height of Static Text area
-
- #define STOP_WID 32 // Width of stop button
- #define STOP_HGT 32 // Height of stop button
- #define STOP_TOP 155 // Top position
- #define STOP_LFT 300 // Left position
-
- #define GO_WID 32 // Width of Go button
- #define GO_HGT 32 // Height of Go button
- #define GO_TOP 155 // Top position
- #define GO_LFT 335 // Left position
-
- #define LEFT_STAT 13 // Left most position of Stat Text
-
- #define STAT_HDR_TOP 42 // Top vert position of the Stat Text titles
- #define PHASE_NAME_WID 130 // Width of Phase names
-
- #define GO_RES_ID 2001 // Res ID of Go button
- #define STOP_RES_ID 3001 // Res ID of Stop button
-
- #define NeoLeftStyleID 130
- #define NeoRightStyleID 131
- #define NeoTextStyleID 132
-
- #define REC_H 116 // Where "Objects" gets drawn
- #define REC_V 25 // Vert posn
-
- #define TIME_H 274 // Where "Time" gets printed.
- #define TIME_V 25 // Vert posn same as above
-
- // Statically declared entities
-
- static long default_vals[5] = { 25000, 25000, 25000, 25000, 25000 };
- static long default_maxs[5] = { 1000000, 1000000, 1000000, 1000000, 1000000 };
-
-
- static Str255 Txts = "\p00";
- static Str255 PhaseNames[] = { "\pInsert", "\pLocate Randomly",
- "\pLocate Serially", "\pChange", "\pDelete"
- };
-
- enum phases {
- kNoPhase = -1,
- kMinPhase = 0,
- kInsert = kMinPhase,
- kRandomly,
- kSerially,
- kChange,
- kDelete,
- kMaxPhase = kDelete
- };
-
- // Indices into the array going across. There are three of them
- enum cols {
- kMinCol = 0,
- kTargetCol = kMinCol,
- kSoFar,
- kPerObject,
- kTotal,
- kMaxCol = kTotal
- };
-
- enum states {
- kStop,
- kStart
- };
-
- typedef struct NeoPhase {
- Boolean dirty; /* Do values for this phase need updating? */
- long target; /* Copied from TextBox field in main pane */
- long delta; /* Initial count */
- long done; /* Number of operations done so far */
- long committed; /* Number of operations committed so far */
- long soFar; /* Total time units in Milliseconds so far */
- } NeoPhase;
-
- #define k30MicroMinutes -(1800000000L)
-
- extern long gLoopOverhead; // Timer Manager Overhead
-
- #endif
-